import { Toast } from 'mint-ui'

var toast = {
  toast: (message, type) => {
    let option = {
      message,
      iconClass: `icon icon-${type}`
    }
    if (type === 'error') {
      Toast(option)
    } else if (type === 'success') {
      Toast(option)
    } else if (type === 'warning') {
      Toast(option)
    } else {
      Toast(option)
    }
  }
}

export default toast
